<?php
// +---------------------------------------------------------------------------+
// | This file is part of the KnowledgebasePublisher package                   |
// | KnowledgebasePublisher - web based knowledgebase publisher tool           |
// |                                                                           |
// | Author:  Evgeny Leontev <eleontev@gmail.com>                              |
// | Copyright (c) 2005 Evgeny Leontev                                         |
// |                                                                           |
// | For the full copyright and license information, please view the LICENSE   |
// | file that was distributed with this source code.                          |
// +---------------------------------------------------------------------------+

$z = strtolower(ini_get('zlib.output_compression'));
if(!$z || $z == 'off') { ob_start("ob_gzhandler"); }
else                   { ob_start(); }

if($conf['debug_speed']) { 
	require_once 'speed/_dima_timestat.php';
}

require_once 'core/base/BaseApp.php';

require_once 'core/base/Controller.php';
require_once 'core/app/AppController.php';

require_once 'core/base/BaseObj.php';
require_once 'core/app/AppObj.php';

require_once 'core/base/BaseModel.php';
require_once 'core/app/AppModel.php';

require_once 'core/base/BaseView.php';
require_once 'core/app/AppView.php';

require_once 'core/app/AppMsg.php';

require_once 'adodb/adodb.inc.php';
require_once 'eleontev/PageByPage.php';
require_once 'eleontev/HTML/tplTemplatez.php';
require_once 'eleontev/HTML/FormSelect.php';
require_once 'eleontev/URL/RequestData.php';
require_once 'eleontev/SQL/SortOrder.php';
require_once 'eleontev/Assorted.inc.php';
require_once 'eleontev/Auth/AuthPriv.php';
require_once 'eleontev/Navigation.php';

require_once APP_MSG_LANG_DIR . 'config_lang.php';
define('XAJAX_DEFAULT_CHAR_ENCODING', $conf['lang']['meta_charset']); // for xajax


if(file_exists(APP_EXTRA_MODULE_DIR . 'config.inc.php')) {
	require_once APP_EXTRA_MODULE_DIR . 'config.inc.php';
}

// if using https
if($conf['use_https'] && $_SERVER['SERVER_PORT'] != 443) {
	header("Location: " . APP_HOME_PATH);
	exit();		
}


// able to run php 5 functions
$func = array('http_build_query');
require_once 'PHP/Compat.php';
PHP_Compat::loadFunction($func);
?>